<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>生产工单上报</title>

<script type="text/javascript" src="${ctx }/js/common.js"></script>
<script type="text/javascript" language="javascript">
	//     var selBtn = 0;
	//     var nodeId = 0;
	$(document).ready(function() {
        var datepickerconf = {
            changeMonth : true,
            changeYear : true,
            dateFormat : "yy/mm/dd"
        };
		$("#firstInspectionTime").datepicker(datepickerconf);
		$("#firstInspectionTime").val(getSystemData());
		$("#completeDate").datepicker(datepickerconf);
		$("#completeDate").val(getSystemData());
		$("#receivingInspectionDate").datepicker(datepickerconf);
		$("#receivingInspectionDate").val(getSystemData());
	});
</script>
</head>
<body>
	<h4>
		生产管理. <small>分配生产工单</small>
		</h4>
		<form action="workOrderAction!report" class="form-horizontal" role="form" method="post">
			<input type="hidden" name="workOrder.id" value="${workOrder.id}"/>
			<input type="hidden" name="workOrder.status" value="${workOrder.status}"/>
			<input type="hidden" name="workOrder.partCode" value="${workOrder.partCode}"/>
			<div class="form-group">
		    	<label class="col-sm-2 control-label">批次号</label>
		        <div class="col-sm-10">
		        	<p class="form-control-static">${workOrder.batchNum}</p>
		      	</div>
		    </div>
			<div class="form-group">
				<label class="col-sm-2 control-label">零件类型</label> 
				<div class="col-sm-10">
				<select id="partType"
					class="form-control" name="partType">
					<option value=0>全部</option>
					<option value=1>外购</option>
					<option value=2>自制</option>
					<option value=3>组焊</option>
					<option value=4>组合</option>
					<option value=6>总成</option>
					<option value=5>整机</option>
				</select>
				</div>
			</div>
			<div class="form-group">
		    	<label for="lastname" class="col-sm-2 control-label">工人姓名</label>
		        <div class="col-sm-10">
   		        	<p class="form-control-static">${workOrder.workerName}</p>
		      	</div>
		    </div>
			<div class="form-group">
		    	<label class="col-sm-2 control-label">零件图号</label>
		        <div class="col-sm-10">
		        	<p class="form-control-static">${workOrder.partCode}</p>
		      	</div>
		    </div>
			<div class="form-group">
		    	<label class="col-sm-2 control-label">零件名称</label>
		        <div class="col-sm-10">
		        	<p class="form-control-static">${workOrder.partName}</p>
		      	</div>
		    </div>
			<div class="form-group">
		    	<label for="lastname" class="col-sm-2 control-label">单件工时</label>
		        <div class="col-sm-10">
		        	<p class="form-control-static">${workOrder.manHours}</p>
		      	</div>
		    </div>
			<div class="form-group">
		    	<label class="col-sm-2 control-label">数量</label>
		        <div class="col-sm-10">
		        	<input type="text" class="form-control" name="workOrder.quantity" id="quantity" placeholder="请输入数量" value="${workOrder.quantity}">
		      	</div>
		    </div>
		    <div class="form-group">
   		    	<label class="col-sm-2 control-label">车间主任</label>
   		        <div class="col-sm-10">
   		        	<p class="form-control-static">${workOrder.workshopLeader}</p>
   		      	</div>
   		    </div>
			<div class="form-group">
		    	<label class="col-sm-2 control-label">工作单状态</label>
		        <div class="col-sm-10">
		        	<p class="form-control-static">
                        <c:choose>
                            <c:when test="${'NEW'==workOrder.status}">
                                    新工作单
                            </c:when>
                            <c:when test="${'FCHECK'==workOrder.status}">
                            	已完成首检
                            </c:when> 
                            <c:when test="${'INSPECTED'==workOrder.status}">
                            	已完成检验
                            </c:when>
                            <c:when test="${'ACTIVE'==workOrder.status}">
                            	未分配
                            </c:when>
                        </c:choose>
                    </p>
		      	</div>
		    </div>
		    
			<div class="form-group">
		      <div class="col-sm-offset-2 col-sm-10">
		         <button type="submit" class="btn btn-default">上报</button>
		         <button type="button" class="btn btn-default" onClick="javascript :history.back(-1);">取消</button>
		      </div>
		   </div>
		</form>
</body>
</html>